# coding: utf-8
from tornado.web import RequestHandler
from abstract import base

import os
from datetime import datetime 
import os.path
#action
class login(RequestHandler):
    def get(self):
        path=self.request.path
        self.render("admin/default/login.html",path=path)
    def post(self):
        self.redirect('/admin')

class logout(RequestHandler):
    def get(self):
        path=self.request.path
        self.render("admin/default/index.html")
        
class default_index(base):
    def get(self):
        self.render()

class default_main(base):
    def get(self):
        server={"time":datetime.now(),  "windows":os.name}
        return self.render(server=server)

class error(base):
    def get(self):
        self._context.path=self.request.path
        self.render()


